home *** CD-ROM | disk | FTP | other *** search
- % INIT.WAM Initialization file for WAM emulator
- %
- % This file is part of Prolog-68.
- %
- % Copyright © 1990 - 1994 Jens Kilian
- %
- % This program is free software; you can redistribute it and/or modify
- % it under the terms of the GNU General Public License as published by
- % the Free Software Foundation; either version 1, or (at your option)
- % any later version.
- %
- % This program is distributed in the hope that it will be useful,
- % but WITHOUT ANY WARRANTY; without even the implied warranty of
- % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- % GNU General Public License for more details.
- %
- % You should have received a copy of the GNU General Public License
- % along with this program; if not, write to the Free Software
- % Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- %
- %------------------------------------------------------------------------------
- % This file serves as a script to set up the data structures of the
- % WAM emulator. It is divided into several parts. An empty line
- % terminates each part.
- % Lines beginning with '%' contain comments and are ignored. All
- % other lines must be given in the correct format to be recognized.
- %
- %---- Part I : names of atoms known to the emulator ---------------------------
- %
- % Each line contains the name of an atom, enclosed in apostrophes.
- % A line corresponds to an entry in the STD...[] array.
- %
- %---- basic atoms
- '[]'
- '{}'
- ','
- ';'
- 'call'
- '-'
- 'end_of_file'
- %---- entry points
- 'shell'
- 'failure_error_handler'
- 'dynamic_call'
- 'debug_dynamic_call'
- %---- comparison codes
- '<'
- '='
- '>'
- %---- keywords for statistics/2
- 'runtime'
- 'memory'
- 'core'
- 'program'
- 'heap'
- 'global_stack'
- 'local_stack'
- 'trail'
- 'garbage_collection'
- %---- used in error handling
- 'fail'
- %---- names of predefined I/O streams
- 'user'
- 'user_input'
- 'user_output'
- 'user_error'
- %---- stream opening modes
- 'read'
- 'write'
- 'append'
- %---- stream options and properties
- 'text'
- 'utf'
- 'binary'
- 'reposition'
- 'error'
- 'eof_code'
- 'reset'
- 'input'
- 'output'
- %---- error ID codes
- 'generic_error'
- 'type_error'
- 'instantiation_error'
- 'range_error'
- 'existence_error'
- 'expression_error'
- 'zero_division_error'
- 'input_output_error'
- 'memory_error'
- 'system_error'
- %---- names of global flags
- 'character_escapes'
- 'fileerrors'
- 'gc_trace'
- 'unknown'
- 'error_handling'
- '$debugger_mode'
- '$debugger_counter'
- '$debugger_skip_id'
- %---- predicate properties
- 'built_in'
- 'foreign'
- 'compiled'
- 'interpreted'
- 'dynamic'
- 'multifile'
- 'exported'
-
- %---- Part II : names and arities of functors known to the emulator -----------
- %
- % Each line contains the name of an atom (see above) and a decimal
- % number, separated by '/'.
- % A line corresponds to an entry in the STD...[] array.
- %
- %---- basic functors
- '.'/2
- '{}'/1
- ':-'/2
- ','/2
- ';'/2
- 'call'/1
- '-'/2
- %---- functor used to mark variables for write/[1,2] and writeq/[1,2]
- '$VAR'/1
- %---- functors used to construct database references, streams etc.
- '$ref'/2
- '$stream'/2
- '$stream_position'/4
- %---- stream options and properties
- 'type'/1
- 'alias'/1
- 'eof_action'/1
- 'file_name'/1
- 'position'/1
- %---- read options
- 'vars'/1
- 'variable_names'/1
- 'singletons'/1
- 'void_vars'/1
- %---- predicate properties
- 'imported_from'/1
-
- %---- Part III : names and arities of built-in predicates ---------------------
- %
- % Each line corresponds to an entry in the emulator's dispatching table
- % for built-ins. The table index is given before the name of the builtin.
- %
- %---- system predicates
- 0 'halt'/1
- 1 'true'
- 2 'system'/1
- 3 '$CREATE_BLOCK'/2
- 4 '$DELETE_BLOCK'
- 5 '$LOCK_BLOCK'
- 6 '$UNLOCK_BLOCK'
- 7 'signal_exception'/1
- 8 '$MARK'/1
- 9 '$CUT'/1
- 10 '$GC'
- 11 '$UNKNOWN'
- 12 'statistics'
- 13 '$STATISTICS'/2
- 14 'abort'
- 15 '$UNSPY'
- 16 '$DYNCALL'
- 17 '$SPY'/1
- 18 '$NOSPY'/1
- 19 '$SPIED'/1
- 20 'signal_error'/3
- 21 'propagate_error'/4
- 22 '$LOCAL_HANDLERS'/2
- 23 'set_error_handler'/3
- %---- term comparison
- 32 '='/2
- 33 'compare'/3
- 34 '=='/2
- 35 '\\=='/2
- 36 '@<'/2
- 37 '@=<'/2
- 38 '@>'/2
- 39 '@>='/2
- 40 'sort'/2
- 41 'keysort'/2
- 42 'msort'/2
- %---- input & output of terms
- 48 'read'/1
- 49 'read'/2
- 50 'sread'/2
- 51 'sread'/3
- 52 'write'/1
- 53 'write'/2
- 54 'writeq'/1
- 55 'writeq'/2
- 56 'display'/1
- 57 'display'/2
- 58 'displayq'/1
- 59 'displayq'/2
- %---- input & output of characters
- 60 'get0'/1
- 61 'get0'/2
- 62 'get'/1
- 63 'get'/2
- 64 'skip'/1
- 65 'skip'/2
- 66 'put'/1
- 67 'put'/2
- 68 'tab'/1
- 69 'tab'/2
- %---- I/O support
- 72 'op'/3
- 73 'prompt'/2
- 74 'prolog_flag'/3
- %---- BIOS access (for demos only)
- 75 'biosstat'
- 76 'biosget0'/1
- 77 'biosput'/1
- %---- stream operations
- 80 'open'/4
- 81 'open_null_stream'/1
- 82 '$CLOSE'/1
- 83 'flush_output'/1
- 84 '$STREAM_PROPERTIES'/2
- 85 '$NEXT_STREAM'/2
- 86 'set_input'/1
- 87 'set_output'/1
- 88 'current_input'/1
- 89 'current_output'/1
- 90 'character_count'/2
- 91 'line_count'/2
- 92 'line_position'/2
- 93 'set_stream_position'/2
- 94 '$ABS_FILE_NAME'/3
- %---- structure access
- 96 '=..'/2
- 97 'functor'/3
- 98 'arg'/3
- 99 'atom_chars'/2
- 100 'number_chars'/2
- 101 'name'/2
- 102 'copy_term'/2
- %---- database access
- 130 '$FUNCTOR'/3
- 131 '$PROCEDURE'/2
- 133 '$LOAD_CODE'/3
- 135 '$PROC_PROPERTIES'/2
- 136 '$NEXT_ATOM'/2
- 137 '$CURR_PROC'/1
- 138 '$NEXT_PROC'/2
- 139 '$NEXT_OP'/5
- 140 '$INSTALL_CODE'/2
- 141 '$MAKE_STATIC'/1
- 142 '$MAKE_DYNAMIC'/1
- 148 '$ASSERTA'/3
- 149 '$ASSERTZ'/3
- 150 '$CLAUSE'/2
- 151 '$NEXT_CLAUSE'
- 152 'recorda'/3
- 153 'recordz'/3
- 154 '$RECORDED'/3
- 155 '$NEXT_RECORDED'
- 156 '$CURRENT_KEYS'/1
- 159 'erase'/1
- %---- term classification
- 160 'var'/1
- 161 'nonvar'/1
- 164 'composite'/1
- 165 'simple'/1
- 166 'integer'/1
- 167 'atom'/1
- 168 'atomic'/1
- 169 'nonatomic'/1
-
- %---- Part IV : names, types and priorities of standard operators -------------
- %
- % Each line contains the name of an atom, a (decimal) priority
- % and an operator type, separated by single spaces.
- %
- ':-' 1200 xfx
- '-->' 1200 xfx
- '?-' 1200 fx
- ':-' 1200 fx
- 'meta_predicate' 1150 fx
- 'multifile' 1150 fx
- 'mode' 1150 fx
- 'public' 1150 fx
- 'dynamic' 1150 fx
- ';' 1100 xfy
- '->' 1050 xfy
- ',' 1000 xfy
- '\\+' 900 fy
- 'spy' 900 fy
- 'not' 900 fy
- 'nospy' 900 fy
- '=' 700 xfx
- '\\=' 700 xfx
- '==' 700 xfx
- '\\==' 700 xfx
- '@<' 700 xfx
- '@>' 700 xfx
- '@=<' 700 xfx
- '@>=' 700 xfx
- '=..' 700 xfx
- 'is' 700 xfx
- '=:=' 700 xfx
- '=\\=' 700 xfx
- '<' 700 xfx
- '>' 700 xfx
- '=<' 700 xfx
- '>=' 700 xfx
- ':' 600 xfy
- '+' 500 yfx
- '-' 500 yfx
- '\\/' 500 yfx
- '/\\' 500 yfx
- 'xor' 500 yfx
- '*' 400 yfx
- '/' 400 yfx
- '//' 400 yfx
- 'rem' 400 yfx
- 'mod' 400 yfx
- '>>' 400 yfx
- '<<' 400 yfx
- '**' 200 xfx
- '^' 200 xfy
- '+' 200 fy
- '-' 200 fy
- '\\' 200 fy
-
- %---- END OF FILE -------------------------------------------------------------
-